package m.jclecai.com.activity;


import android.content.Intent;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.squareup.okhttp.Request;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import butterknife.BindView;
import butterknife.OnClick;
import m.jclecai.com.R;
import m.jclecai.com.adapter.ExpandGroupBuyInfoAdapter;
import m.jclecai.com.base.BaseActivity;
import m.jclecai.com.bean.GroupBuyBean;
import m.jclecai.com.bean.GroupBuyDetailBean;
import m.jclecai.com.bean.HomeItem;
import m.jclecai.com.bean.MyLotteryBean;
import m.jclecai.com.bean.TicketsBean;
import m.jclecai.com.bean.UserBean;
import m.jclecai.com.listener.OnItemClickListener;
import m.jclecai.com.ui.BetKSActivity;
import m.jclecai.com.ui.BetPlS_PLW_SD_QXCActivity;
import m.jclecai.com.ui.BetRXJ_SFCActivity;
import m.jclecai.com.ui.BetSEXWActivity;
import m.jclecai.com.ui.BetSSCActivity;
import m.jclecai.com.ui.BetSSQ_DLT_QLCActivity;
import m.jclecai.com.ui.BetSYXWActivity;
import m.jclecai.com.ui.BettingKLSFActivity;
import m.jclecai.com.ui.BjPk10Activity;
import m.jclecai.com.ui.Bjkl8Activity;
import m.jclecai.com.utils.BaseUtils;
import m.jclecai.com.utils.DateUtil;
import m.jclecai.com.utils.PreferenceUtil;
import m.jclecai.com.utils.http.FastOk;
import m.jclecai.com.utils.http.HttpManager;
import m.jclecai.com.view.CustomExpandListview;

/**
 * Created by ZD on 2017/6/2.
 * 彩票记录的基类
 * 购买记录 追号记录 合买记录的基类
 */

public abstract class LotteryRecordActivity extends BaseActivity implements OnItemClickListener {
    @Nullable
    @BindView(R.id.iv_icon)
    protected ImageView ivIcon;
    @Nullable
    @BindView(R.id.tv_progress)
    protected TextView tvProgress;
    @Nullable
    @BindView(R.id.tv_progress_loss)
    protected TextView tvProgressLoss;
    @Nullable
    @BindView(R.id.tv_price)
    protected TextView tvPrice;
    @Nullable
    @BindView(R.id.tv_my_price)
    protected TextView tvMyPrice;
    @Nullable
    @BindView(R.id.tv_name)
    protected TextView tvName;
    @Nullable
    @BindView(R.id.tv_record)
    protected TextView tvRecord;
    @Nullable
    @BindView(R.id.tv_end)
    protected TextView tvEnd;
    @Nullable
    @BindView(R.id.tv_commission)
    protected TextView tvCommission;
    @Nullable
    @BindView(R.id.et_count)
    protected EditText et_count;
    @Nullable
    @BindView(R.id.tv_count)
    protected TextView tvCount;
    @Nullable
    @BindView(R.id.pay_all_money)
    protected TextView payAllMoney;
    @Nullable
    @BindView(R.id.tv_pay_money)
    protected TextView tvPayMoney;
    @Nullable
    @BindView(R.id.group_status)
    protected TextView groupStatus;
    @Nullable
    @BindView(R.id.tv_sale)
    protected TextView tvSale;
    @Nullable
    @BindView(R.id.fl_buy)
    protected FrameLayout flBuy;
    @Nullable
    @BindView(R.id.ll_record)
    protected LinearLayout llRecord;
    @Nullable
    @BindView(R.id.tv_lottery)
    protected TextView tvLottery;

    @Nullable
    @BindView(R.id.tv_award)
    protected TextView tvLotteryAward;

    @Nullable
    @BindView(R.id.tv_award_money)
    protected TextView tvLotteryAwardMoney;


    @Nullable
    @BindView(R.id.tv_title)
    protected TextView tvTitle;
    @Nullable
    @BindView(R.id.tv_num)
    protected TextView tvNum;
    @Nullable
    @BindView(R.id.tv_footer_end_time)
    protected TextView tvFooterEndtime;
    @Nullable
    @BindView(R.id.tv_order)
    protected TextView tvOrder;
    @Nullable
    @BindView(R.id.tv_desc)
    protected TextView tvDesc;
    @Nullable
    @BindView(R.id.tv_time)
    protected TextView tvTime;
    @Nullable
    @BindView(R.id.tv_head_end_time)
    protected TextView tvHeadEndTime;
    @Nullable
    @BindView(R.id.tv_head_end_time_desc)
    protected TextView tvHeadEndTimeDesc;
    @Nullable
    @BindView(R.id.tv_get_gift)
    protected TextView tvGetGift;
    @Nullable
    @BindView(R.id.tv_money)
    protected TextView tvMoney;
    @Nullable
    @BindView(R.id.tv_continue)
    protected TextView tv_continue;
    @Nullable
    @BindView(R.id.tv_go_lottery)
    protected TextView tv_go_lottery;
    @Nullable
    @BindView(R.id.tv_order_money)
    protected TextView tvOrderMoney;
    @Nullable
    @BindView(R.id.tv_stop)
    protected TextView tvStop;

    protected CustomExpandListview expand_list;
    protected GroupBuyBean groupBean;
    protected ExpandGroupBuyInfoAdapter adapter;
    protected UserBean userBean;
    protected GroupBuyDetailBean detailBean;
    protected int surplusLottery = 0;
    protected int countBuy = 1;
    protected int page = 1;
    protected List<List> datas;
    protected int from = 0;//默认来自合买 0-合买中心 1-合买记录
    protected static final int BUY = 0;
    protected static final int RECORD = 1;

    enum CLASSNAME {
        CHASERECORDLISTACTIVITY, BUYDETAILACTIVITY, GROUPBUYDETAILACTIVITY
    }

    protected void showBuyStatus() {
        if (detailBean == null || groupStatus == null) return;
        String result = TextUtils.isEmpty(detailBean.getResult()) ? "" : detailBean.getResult();
        switch (result) {
            case "已出票":
                groupStatus.setBackgroundResource(R.mipmap.detail_01);
                break;
            case "出票中":
                groupStatus.setBackgroundResource(R.mipmap.detail_02);
                break;
            case "已撤单":
                groupStatus.setBackgroundResource(R.mipmap.detail_03);
                break;
            case "已中奖":
                groupStatus.setBackgroundResource(R.mipmap.detail_04);
                break;
            case "等待出票":
                groupStatus.setBackgroundResource(R.mipmap.detail_05);
                break;
            case "等待派奖":
                groupStatus.setBackgroundResource(R.mipmap.detail_06);
                break;
            case "未中奖":
                groupStatus.setBackgroundResource(R.mipmap.detail_07);
                break;
        }
    }

    //公共获取购买记录的方法
    protected void getData(String url) {
        Log.e("classType", this.getClass().getName());
        showDialog();
        Map<String, String> pair = new HashMap<>();
        pair.put("user", userBean.getUsername());
        pair.put("password", PreferenceUtil.getPassword(this));
        pair.put("gid", groupBean.getLotteryid());
        pair.put("id", groupBean.getId());
        pair.put("planNo", groupBean.getProjectno());
        HttpManager.postAsyn(url, new HttpManager.StringCallback() {
            @Override
            public void onFailure(Request request, IOException e) {
                dissDialog();
            }

            @Override
            public void onResponse(String response) {
                dissDialog();
                detailBean = FastOk.get(response, GroupBuyDetailBean.class);
                if (detailBean != null && 0 == detailBean.getStatus()) {
                    execData();
                }
                adapter.notifyDataSetChanged();
                for (int i = 0; i < adapter.getGroupCount(); i++) {// 默认全部展开
                    expand_list.expandGroup(i);
                }
            }
        }, pair);
    }

    //处理数据
    protected void execData() {
        try {
            page = 1;
            datas.clear();
            showBuyStatus();
            String className = this.getClass().getSimpleName().toUpperCase();
            updateText(detailBean);
            boolean showContinueBuy = true;
            adapter.setOrderMoney(detailBean.getTrace_money());
            //彩票数据处理
            if (detailBean.getMatchorder() != null
                    && detailBean.getMatchorder().size() > 0
                    && detailBean.getMatchorder().get(0) != null) {
                datas.add(detailBean.getMatchorder());
                showContinueBuy = false;
            } else {
                //GroupBuyDetailActivity
                if (className.equals(CLASSNAME.GROUPBUYDETAILACTIVITY.name())) {
                    if (detailBean.getMyLottery() != null) {
                        datas.add(detailBean.getMyLottery());
                        //冠亚军特殊情况 需要处理ticket字段 如果getMyLottery数据为空则加载getTickets
                        if (detailBean.getMyLottery().size() == 1
                                && detailBean.getMyLottery().get(0) != null
                                && TextUtils.isEmpty(detailBean.getMyLottery().get(0).getCode())
                                && TextUtils.isEmpty(detailBean.getMyLottery().get(0).getContent())) {
                            datas.clear();
                            List<TicketsBean> tickets = detailBean.getTickets();
                            String ticket_codes = "";
                            if (tickets != null && tickets.size() > 0)
                                ticket_codes = tickets.get(0).getTicket_codes();
                            formatTicketData(tickets, ticket_codes);
                        }
                    }
                } else {
                    List<TicketsBean> tickets = detailBean.getTickets();
                    String ticket_codes = "";
                    if (tickets != null && tickets.size() > 0)
                        ticket_codes = tickets.get(0).getTicket_codes();
                    if (!TextUtils.isEmpty(ticket_codes)) {//自购
                        formatTicketData(tickets, ticket_codes);
                    } else {//这里的数据格式是追号记录详情
                        //code显示需要根据 selectid 1-直接显示(复式) 0-分割逗号显示(单式)
                        List<MyLotteryBean> list = new ArrayList<>();
                        String multipe = detailBean.getMultiple();
                        if (TextUtils.isEmpty(multipe))
                            multipe = String.valueOf((int) Float.parseFloat(detailBean.getOne_money())
                                    / detailBean.getProject_nums() / 2);
                        if ("0".equals(detailBean.getSelectid())) {
                            String[] split = TextUtils.isEmpty(detailBean.getCodes()) ? new String[]{}
                                    : detailBean.getCodes().split(",");
                            for (String value : split) {
                                String content = String.format(getString(R.string.sc_chase_record)
                                        , value
                                        , detailBean.getMethodname()
                                        , detailBean.getProject_nums() / split.length
                                        , multipe);
                                MyLotteryBean bean = new MyLotteryBean(content, content);
                                list.add(bean);
                            }
                        } else {
                            if (list.size() <= 0) {
                                String codes = TextUtils.isEmpty(detailBean.getCodes()) ? ""
                                        : detailBean.getCodes().replaceAll(",", " ");
                                String content = String.format(getString(R.string.sc_chase_record)
                                        , codes
                                        , detailBean.getMethodname()
                                        , detailBean.getProject_nums()
                                        , multipe);
                                MyLotteryBean bean = new MyLotteryBean(content, content);
                                list.add(bean);
                            }
                        }
                        datas.add(list);
                    }
                }
            }
            //标题 副标题数据处理
            String code = "";
            if (detailBean.getMyLottery() != null
                    && detailBean.getMyLottery().size() > 0
                    && detailBean.getMyLottery().get(0) != null)
                code = detailBean.getMyLottery().get(0).getCode();
//            if ("任九场胆拖".contains(detailBean.getMethodname()) && code.length() > 7)
//                code = code.substring(7, code.length());
            adapter.setLottery(code);
            adapter.setTeambuy_isshow(showBuyRecord(className));
            adapter.setType(detailBean.getType());
            int visibility = showContinueBuy ? View.VISIBLE : View.GONE;
            if (tv_continue != null)
                tv_continue.setVisibility(visibility);
            if (className.equals(CLASSNAME.CHASERECORDLISTACTIVITY.name())) {
                adapter.setFllowPeople(detailBean.getJoins());
                adapter.setTerm("已追" + detailBean.getFinish_count() +
                        "期,共" + detailBean.getTotal_count() + "期");
                if (tv_go_lottery != null) {
                    tv_go_lottery.append(detailBean.getType());
                    tv_go_lottery.append("投注");
                }
                //追号
                getBuyUser();
            } else if (className.equals(CLASSNAME.BUYDETAILACTIVITY.name())) {
                adapter.setTitle(detailBean.getType() + "  " +
                        detailBean.getProject_nums() + "注" +
                        detailBean.getMultiple() + "倍");
                if (tv_go_lottery != null) {
                    tv_go_lottery.append(detailBean.getType());
                    tv_go_lottery.append("投注");
                }
            } else if (className.equals(CLASSNAME.GROUPBUYDETAILACTIVITY.name())) {
                adapter.setFllowPeople(detailBean.getJoins());
                adapter.setTitle(detailBean.getType() + " " +
                        detailBean.getMethodname().replaceAll("[*]", "串"));
                getBuyUser();
            }
            if (ivIcon != null)
                ivIcon.setImageResource(getIcon());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    void formatTicketData(List<TicketsBean> tickets, String ticket_codes) {
        if (!TextUtils.isEmpty(ticket_codes)) {
            String[] split = ticket_codes.split(",");
            List<MyLotteryBean> list = new ArrayList<>();
            String mulit = "<br/><small>" + tickets.get(0).getTicket_result() +
                    tickets.get(0).getTicket_nums() + "注"
                    + tickets.get(0).getTicket_times() + "倍</small>";
            //这里，我们是需要对MyLotteryBean中的数据进行一个处理的
            for (MyLotteryBean myLotteryBean : detailBean.getMyLottery()) {
                String content = myLotteryBean.getContent();
                //后台数据传递过来时 有getCode和getContent 但是任九场等一些场次同时包含两个参数 导致数据重复一次 也偶尔会出现两个参数都没有的情况 所以这里只好全部判断
                if (content == null || (TextUtils.isEmpty(content) && TextUtils.isEmpty(myLotteryBean.getCode())))
                    continue;
                if (content.indexOf("|") != -1) {
                    content = content.substring(content.indexOf("|") + 1);
                } else if (content.indexOf("]") != -1) {
                    content = content.substring(content.indexOf("]") + 1);
                }
                content = content.replaceAll(",", " ");
                list.add(new MyLotteryBean(content + mulit, content + mulit));
            }
            if (list.size() <= 0)
                for (String value : split) {
                    list.add(new MyLotteryBean(value + mulit, value + mulit));
                }


            datas.add(list);
        }
    }

    //购买记录用户可见规则
    String showBuyRecord(String className) {
        String teambuy_isshow = "";//0-完全公开 1-截止后公开 2-仅跟单人可看 3-完全保密
        //合买详情才涉及是否显示投注记录 其余全部显示
        if (!className.equals(CLASSNAME.GROUPBUYDETAILACTIVITY.name())) {
            adapter.setShowBuyRecord(true);
            return "";
        }
        String show = "-1";
        if (detailBean != null && !TextUtils.isEmpty(detailBean.getTeambuy_isshow()))
            show = detailBean.getTeambuy_isshow();
        long currTime = System.currentTimeMillis();
        long endTime = DateUtil.strToLong(detailBean.getEndtime());
        switch (show) {
            case "0"://公开
                teambuy_isshow = "完全公开";
                adapter.setShowBuyRecord(true);
                break;
            case "1"://跟单可见
                teambuy_isshow = "跟单可见";
                if (detailBean.getTeam_users() instanceof List) {
                    int index = Arrays.asList(detailBean.getTeam_users()).
                            indexOf(PreferenceUtil.getUserName(this));
                    if (index > -1) {//参与跟单用户
                        adapter.setShowBuyRecord(true);
                    }
                }
                break;
            case "2": //截止后公开
                teambuy_isshow = "截止后公开";
                if (currTime >= endTime) {//当前时间大于截止时间
                    adapter.setShowBuyRecord(true);
                }
                break;
            case "3"://截止后对跟单用户公开  最后一个选项暂时不做
                teambuy_isshow = "截止后对跟单用户公开";
                if (detailBean.getTeam_users() instanceof List) {
                    int index = Arrays.asList(detailBean.getTeam_users()).
                            indexOf(PreferenceUtil.getUserName(this));
                    if (index > -1) {//参与跟单用户
                        if (currTime >= endTime) {//当前时间大于截止时间
                            adapter.setShowBuyRecord(true);
                        }
                    }
                }
                break;
        }
        return teambuy_isshow;
    }


    /**
     * 这里是格式化获取LotteryBean对象；
     *
     * @return
     */
    public MyLotteryBean getMyLotteryBean() {
        return null;
    }

    protected void getBuyUser() {
    }

    protected void updateText(GroupBuyDetailBean bean) {
    }

    public int getIcon() {
        String type = groupBean != null ? groupBean.getType() : "";
        if (TextUtils.isEmpty(type) && detailBean != null)
            type = detailBean.getType();
        for (int i = 0; i < menus.size(); i++) {
            if (menus.get(i).getTitle().equals(type)) {
                return menus.get(i).getIcon();
            }
        }
        return R.color.transparent;
    }





    //直接投注
    @OnClick(R.id.tv_continue)
    void continueBuy() {
        toLottery();
    }

    //去彩种界面投注
    //去投注界面
    @OnClick(R.id.tv_go_lottery)
    void toLottery() {
        String typeStr = groupBean != null ? groupBean.getType() : "";
        if (TextUtils.isEmpty(typeStr) && detailBean != null)
            typeStr = detailBean.getType();
        String type = "";
        for (int i = 0; i < menus.size(); i++) {
            if (menus.get(i).getTitle().equals(typeStr)) {
                type = menus.get(i).getTypes();
                break;
            }
        }
        if (type.equals("ssq") || type.equals("dlt") || type.equals("qlc")) {
            Intent intent = new Intent(this, BetSSQ_DLT_QLCActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("pls") || type.equals("plw") || type.equals("sd") || type.equals("qxc")) {
            Intent intent = new Intent(this, BetPlS_PLW_SD_QXCActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("sdsyxw") || type.equals("syxw") || type.equals("gdsyxw")
                || type.equals("zjsyxw") || type.equals("shsyxw") || type.equals("jssyxw")) {
            Intent intent = new Intent(this, BetSYXWActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("sfc") || type.equals("rxj") || type.equals("rjc")) {
            Intent intent = new Intent(this, BetRXJ_SFCActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("cqssc")) {
            Intent intent = new Intent(this, BetSSCActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("jclq")) {
            BaseUtils.startAcy(this, LotteryJCLQActivity.class);
        } else if (type.equals("jczq")) {
            BaseUtils.startAcy(this, LotteryJCZQActivity.class);
        } else if (type.equals("jsks") || type.equals("ahks") || type.equals("hbks") || type.equals("jlks")) {
            Intent intent = new Intent(this, BetKSActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("xyxh")) {
            Intent intent = new Intent(this, LotteryLuckyActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("bjdc")) {
            Intent intent = new Intent(this, LotteryBJDCActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("klpk")) {
            Intent intent = new Intent(this, LotteryKLPKActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("gdklsf")) {
            Intent intent = new Intent(this, BettingKLSFActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("zjsexw")) {
            //这里是跳转到浙江12选5；
            Intent intent = new Intent(this, BetSEXWActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("pk10")) {
            Intent intent = new Intent(this, BjPk10Activity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("bjkl8")) {
            Intent intent = new Intent(this, Bjkl8Activity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        } else if (type.equals("gyj") || type.equals("gj")) {
            Intent intent = new Intent(this, ChampionActivity.class);
            intent.putExtra("type", type);
            startActivity(intent);
        }
    }

    List<HomeItem> menus = new ArrayList<HomeItem>() {{
        add(new HomeItem("双色球", R.drawable.ssqlogo, "奖池6亿991万", "ssq"));
        add(new HomeItem("大乐透", R.drawable.dltlogo, "奖池35亿8295万", "dlt"));
        add(new HomeItem("福彩3D", R.drawable.sdlogo, "猜中3位赢千元", "sd"));
        add(new HomeItem("竞彩足球", R.drawable.types_jczq, "德国vs英格兰", "jczq"));
        add(new HomeItem("竞彩混合过关", R.drawable.types_jczq, "德国vs英格兰", "jczq"));
        add(new HomeItem("胜负彩", R.drawable.sfclogo, "竞猜14场比赛", "sfc"));
        add(new HomeItem("足球胜负", R.drawable.sfclogo, "竞猜14场比赛", "sfc"));
        add(new HomeItem("竞彩篮球", R.drawable.jclqlogo, "骑士vs掘金", "jclq"));
        add(new HomeItem("重庆时时彩", R.drawable.ssc, "暂无", "cqssc"));
        add(new HomeItem("任九场", R.drawable.r9logo, "竞猜9场比赛", "rxj"));
        add(new HomeItem("任选9场", R.drawable.r9logo, "竞猜9场比赛", "rjc"));

        add(new HomeItem("山东11选5", R.drawable.lottery_sd115_b, "10分钟一期", "sdsyxw", "11选5系列"));
        add(new HomeItem("江西11选5", R.drawable.lottery_jx115, "10分钟一期", "syxw", "11选5系列"));
        add(new HomeItem("广东11选5", R.drawable.lottery_gd115, "10分钟一期", "gdsyxw", "11选5系列"));
        add(new HomeItem("浙江11选5", R.drawable.lottery_zj115_b, "10分钟一期", "zjsyxw", "11选5系列"));
        add(new HomeItem("上海11选5", R.drawable.lottery_hb115, "10分钟一期", "shsyxw", "11选5系列"));
        add(new HomeItem("江苏11选5", R.drawable.lottery_sh115_b, "10分钟一期", "jssyxw", "11选5系列"));
        add(new HomeItem("湖北11选5", R.drawable.hbsyxw, "10分钟一期", "hbsyxw", "11选5系列"));

        add(new HomeItem("江苏快3", R.drawable.lottery_kuai3, "暂无", "ks", "快3系列"));
        add(new HomeItem("江苏快3", R.drawable.lottery_kuai3, "暂无", "jsks", "快3系列"));
        add(new HomeItem("安徽快3", R.drawable.lottery_kuai3, "暂无", "ahks", "快3系列"));
        add(new HomeItem("湖北快3", R.drawable.lottery_kuai3, "暂无", "hbks", "快3系列"));
        add(new HomeItem("吉林快3", R.drawable.lottery_kuai3, "暂无", "jlks", "快3系列"));

        add(new HomeItem("排列三", R.drawable.p3logo, "猜中3位赢千元", "pls"));
        add(new HomeItem("排列五", R.drawable.p5logo, "每周四加奖", "plw"));
        add(new HomeItem("七星彩", R.drawable.qxclogo, "最高奖金500万", "qxc"));
        add(new HomeItem("七乐彩", R.drawable.qlclogo, "2元中500万", "qlc"));
        add(new HomeItem("北京单场", R.drawable.bjdclogo, "", "bjdc"));
        add(new HomeItem("幸运选号", R.drawable.icon_xingyun, "", "xyxh"));
        add(new HomeItem("广东快乐十分", R.drawable.ic_gdklsf, "", "gdklsf"));
        add(new HomeItem("快乐扑克", R.drawable.lottery_pk3, "", "klpk"));
        add(new HomeItem("浙江12选5", R.drawable.lottery_sexw, "", "zjsexw"));
        add(new HomeItem("北京PK10", R.mipmap.pk10, "", "pk10"));
        add(new HomeItem("北京快乐8", R.mipmap.kuaile8, "", "bjkl8"));
        add(new HomeItem("冠军", R.mipmap.cuplogo, "", "gj"));
        add(new HomeItem("冠亚军", R.mipmap.cuplogo, "", "gyj"));
        add(new HomeItem("世界杯冠军", R.mipmap.cuplogo, "", "jcgj"));
    }};

}
